package com.yh.rdkit.controller;

import cn.hutool.json.JSONUtil;
import com.yh.rdkit.demos.Rd;
import com.yh.rdkit.demos.RdkitUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * * Author 30783
 * * Data：2025/3/7 15:01
 */
@Slf4j
@RestController
@RequestMapping("/smiles")
@AllArgsConstructor
public class UtilController {

    @PostMapping("/stand")
        public String standerSmiles(@RequestBody Rd rd){
        RdkitUtils rdkitUtils = new RdkitUtils();
        String standerSmiles = rdkitUtils.toStandardSmiles(rd.getSmiles());
        return standerSmiles;
    }
}
